import { useState, useCallback } from 'react';

export default () => {
  const [juage, setJuage] = useState([]);
  const [showing,setShowing] =useState();

  const addToJuage = useCallback((item) => {
    // @ts-ignore
    setJuage((prevJuage) => [...prevJuage, item]);
  }, []);

  const removeFromJuage = useCallback((item) => {
    setJuage((prevJuage) => prevJuage.filter((juageItem) => juageItem !== item));
  }, []);

  const setShowingValue = (value) => {
    setShowing(value);
  };

  return { juage, addToJuage,removeFromJuage ,showing};
};
